<?php /* Smarty version 2.6.18, created on 2010-03-15 22:38:08
         compiled from home.html */ ?>
<html>
	<head>
		<title>
			GMS - Tran Nguyen Khang - Introduction to Database
		</title>
	</head>
	<body>
			<!-- Vi trong lan load dau tien, tensinhvien chua co gia tri-->
			<?php if (( $this->_tpl_vars['tensinhvien'] )): ?>
				Hello <?php echo $this->_tpl_vars['tensinhvien']; ?>
 <!-- say hello to him/her neu tensinhvien duoc gan gia tri-->
			<?php endif; ?>
			
			<!--form don gian, 1 combo box, 1 button, khi click vao button, say hello to what is selected in the combo box-->
			<form method="POST" action="<?php echo @APPLICATION_URL; ?>
home/xuli/" id="testForm" name="testForm">
				<select id="sinhvien_select" name="sinhvien_select">
					<!-- gia tri combo box duoc fetch tu mang sinh vien-->
					
					<!-- cau truc lenh foreach trong smarty-->
					<?php $_from = $this->_tpl_vars['sinhvien']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['phantu']):
?>				
						<option value="<?php echo $this->_tpl_vars['phantu']; ?>
"><?php echo $this->_tpl_vars['phantu']; ?>
</option>			
					<?php endforeach; endif; unset($_from); ?>
					
				</select>
				<input type="submit" value="click here" id="submit" name="submit"/>
			</form>
			<!--khi submit, form se goi file homeController, function xuliAction-->
	</body>
</html>